<?php
if($strStyleSheet == TRUE){
	echo "<table class='Normal' border='0' align='left' width='450'>";
}
$intWindowWidth = SUBCATEGORY_PICTURE_WIDTH + 40;
     echo "
     <tr align='left' class='Normal'>
         <td align='left' colspan='6'>
             <H2>Sub Category Search Result</H2>
         </td>
     </tr>
     <tr bgcolor='".switch_background($boBG)."'>
         <td>
		 	&nbsp;
		</td>
		<td align='center'>
			 <b>ID</b>
         </td>
		 <td align='center'>
		 	<b>Picture</b>
		</td>
		<td align='center'>
             <b>Category</b>
         </td>
         <td align='center'>
			 <b>Sub-category</b>
         </td>
         <td align='right'>
			&nbsp;
         </td>
     </tr>
";
//include (MODULE . "/screen/SearchSubCategory");
//include (MODULE . "/action/qrySelectSubCategory");
        //echo $strSQL;
if(!$myrow[0]==""){
     do {

echo "
     <tr bgcolor='".switch_background($boBG)."'  class='Normal'>
         <td>
             <a href='" . ScreenURL("EnterSubCategory",array('intSubCategoryID'=>$myrow[0]) ) . "' target='_blank'>
             <img src='./images".SITE_SUFFIX."/update.gif' border='0' alt='Update' align='middle'></a>
		</td>
		<td>
			 ".$myrow["ID"]."
         </td>
		 <td  valign='top'>
";
			if((!$myrow["UploadedPicture"])||($myrow["UploadedPicture"]=="none")){
				echo "no pic";
			}else{
				echo "
				<a href=\"javascript:;\" onMouseUp=\"MM_openBrWindow('".ScreenURL("FullSizePhoto",array('strPicture'=>$myrow["UploadedPicture"],'intWindowWidth'=>$intWindowWidth))."','LargePhoto','toolbar=no,menubar=no,scrollbars=yes,width=".$intWindowWidth.",height=".$intWindowWidth."')\">
					<img src='./images/product/thumbz/".$myrow["UploadedPicture"]."' width='67' border='0' alt='display'>
				</a>";
			}

echo "
			 
		</td>
		<td class='small'>
             ".DisplayLookupValue("tblCategory","Category",$myrow[Category])."
         </td>
         <td>
			 <b>".$myrow["SubCategory"]."</b><br/><span class='small'>".$myrow["SubCategoryDescription"]."</span>
         </td>
         <td align='right'>
              <a href=\"" . ScreenURL("ListSubCategory",array('intSubCategoryID'=>$myrow[0],'ACTION'=>"qryDeleteSubCategory") ) . "\"
                 onclick=\"return confirmLink(this, 'Delete ');\">
              <img src='./images".SITE_SUFFIX."/delete.gif' border='0' alt='delete' align='middle'></a>
         </td>
     </tr>
";

         $boBG = -1 - $boBG;
     } while ($myrow = mysql_fetch_array($result));
}else{
echo "
     <tr class='MandatoryRed'><br/>
         <td colspan='3'>
             Your Search Has Returned No Results.
         </td>
     </tr>
";
}
	if($strStyleSheet == TRUE){
   		echo "</table>";
	}
?>
